home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD Fun House 8
/
CD Funhouse Version 8.0 - Wayzata Technology (7013) (1993).iso
/
pc
/
mac
/
__the_sc
/
hypersta.rs
/
background_2700.txt
< prev
next >
Wrap
Text File
|
1990-10-07
|
2KB
|
122 lines
-- background: 2700 from stack: in.rs
-- bmap block id: 0
-- flags: 0000
-- background id: 0
-- name:
----- HyperTalk script -----
on setupCard
global theGuess
put theGuess into background field "Guess"
play "Chimes"
tabKey
end setupCard
-- part 2 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=390 top=300 right=319 bottom=432
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 14
-- style flags: 0
-- line height: 18
-- part name: guess
----- HyperTalk script -----
on returnKey
send mouseUp to background button "OK"
end returnKey
-- part 3 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=437 top=294 right=327 bottom=474
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: OK
----- HyperTalk script -----
on mouseUp
global theNumber
global guesses
global theGuess
visual effect dissolve to black
put background field "Guess" into theGuess
if theGuess < 1 or theGuess >100 then
beep
answer "You must guess a number from 1 to 100!"
tabKey
exit mouseUp
end if
if theGuess is theNumber then
go to card "You Win"
exit mouseUp
end if
if guesses is 1 then
go to card "You Lose"
exit mouseUp
end if
subtract 1 from guesses
put abs (theGuess-theNumber) into howMany
if howMany>=64 then
go to card "Stars 1"
setupCard
exit mouseUp
end if
if howMany>=32 then
go to card "Stars 2"
setupCard
exit mouseUp
end if
if howMany>=16 then
go to card "Stars 3"
setupCard
exit mouseUp
end if
if howMany>=8 then
go to card "Stars 4"
setupCard
exit mouseUp
end if
if howMany>=4 then
go to card "Stars 5"
setupCard
exit mouseUp
end if
if howMany>=2 then
go to card "Stars 6"
setupCard
exit mouseUp
end if
go to card "Stars 7"
setupCard
end mouseUp
-- part 4 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=475 top=2 right=36 bottom=510
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name:
----- HyperTalk script -----
on mouseUp
visual effect iris close
go home
end mouseUp